def print_file_info(file_path):
    """
    Prints the file path and size in bytes.

    Args:
        file_path (str): The path to the file.

    Returns:
        None
    """
    f = None
    try:
        f = open(file_path, "r", encoding="utf-8")
        print(f.read())
    except Exception as e:
        print(e)
        # f=open(file_path,"w",encoding="utf-8")
    finally:
        if f:
            f.close()


def file_append(file_path, content):
    """
    Appends the given content to the file at the specified path.

    Args:
        file_path (str): The path to the file.
        content (str): The content to append to the file.

    Returns:
        None
    """
    f = None
    try:
        f = open(file_path, "a", encoding="utf-8")
        f.write(f"{content}\n")
        print(f"名称：{__name__}")
    except Exception as e:
        print(e)
    finally:
        if f:
            f.close()

if __name__ == '__main__':
    file_append("test.txt", "hello world")
    print_file_info("test.txt")
